import org.junit.Before;
import org.junit.Test;


import java.io.BufferedReader;
import java.io.PrintStream;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

/**
 * Created with IntelliJ IDEA.
 * User: Thoughtworker
 * Date: 10/10/13
 * Time: 1:14 PM
 * To change this template use File | Settings | File Templates.
 */
public class FootballLeagueManager2Tests {

    private FootballLeagueManager manager;
    private BufferedReader bufferedReader;
    private PrintStream printStream;


    @Before
    public void setUp() {
        printStream = mock(PrintStream.class);
        bufferedReader = mock(BufferedReader.class);
        manager = new FootballLeagueManager(printStream, bufferedReader);

    }

    @Test
    public void shouldLetUserListAllPlayers() throws Exception {
        String optionSelected = "1";
        when(bufferedReader.readLine()).thenReturn(optionSelected);
        manager.run();

    }

    @Test
    public void shouldFindAPlayerByName() throws Exception {
        String optionSelected = "2";
        when(bufferedReader.readLine()).thenReturn(optionSelected);
        manager.run();

    }
}

